import request from '@/utils/request'
export function preparationTree(index) { //台账管理-设备台账-查询权限内设施设备树1
    return request({
        url: '/project-quality/api/equipmentInfo/allTrees/'+index,
        method: 'get'
    })
}
export function deptList() { //获取用户所属分公司和权限内跟公司
    return request({
        url: '/sys-center/api/system/dept',
        method: 'get'
    })
}
//原 put
export function preparationEdit(data) { //维修管理-主体信息-新增
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/put',
        method: 'post',
        data
    })
}
export function preparationAdd(data) { //维修管理-主体信息-新增
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/add',
        method: 'post',
        data
    })
}

export function facilitiesAllList() { //台账管理-设施台账-设施管理-查询权限内所有设施
    return request({
        url: '/project-quality/api/equipmentInfo/facilityList',
        method: 'get',
    })
}
export function facilitiesAllDetails(id) { //维修管理-主体信息-单条查询
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/'+id,
        method: 'get',
    })
}

export function facilitiesAllExport() { //下载导入的Excel的模板
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/download',
        responseType: 'arraybuffer',
        method: 'POST',
    })
}
export function facilitiesAllOrganization(data) { //下载导入的Excel的模板
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/organization',
        method: 'POST',
        data,
    })
}



//临时计划
export function temporaryPlanVersions(data) { //维修管理-临时计划-年度-单位查询版本
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/repairInfo',
        method: 'post',
        data
    })
}
export function temporaryPlanAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairInfoLs/add',
        method: 'post',
        data
    })
}
export function temporaryPlanEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairInfoLs/put',
        method: 'post',
        data
    })
}
export function temporaryPlanDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairInfoLs/'+id,
        method: 'get',
    })
}
export function temporaryPlanPassAll() { //维修管理-临时计划-查询全部审核通过
    return request({
        url: '/maintenance-management/api/repairInfoLs/all',
        method: 'get',
    })
}

export function temExport(data) { //导出临时计划
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/export/ls',
        responseType: 'arraybuffer',
        method: 'post',
        data
    })
}

/**
 * 
 * 临时提交审核
 */
 export function temSubmit(data) { 
    return request({
        url: '/maintenance-management/api/process/audit/commit',
        method: 'post',
        data
    })
}
/**
 * 
 * 临时审核
 */
 export function temApprove(data) { 
    return request({
        url: '/maintenance-management/api/process/audit/audit',
        method: 'post',
        data
    })
}

/**
 * 
 * 
 */
 export function approveHistory(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/logs',
        method: 'post',
        data
    })
}

/**
 * 临时计划查看 - 日常维修计划
 */
 export function temDailyList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairDailyPlan/page',
        method: 'post',
        data
    })
}
 export function temDailyApproveList(data) { //维修管理-临时计划-审批
    return request({
        url: '/maintenance-management/api/process/audit/daily/page',
        method: 'post',
        data
    })
}

 export function temDailyAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairDailyPlan/add',
        method: 'post',
        data
    })
}
export function temDailyEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairDailyPlan/edit',
        method: 'post',
        data
    })
}
export function temDailyDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairDailyPlan/del/'+id,
        method: 'get',
    })
}
export function temDailyDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairDailyPlan/'+id,
        method: 'get',
    })
}
/**
 * 临时计划查看 - 坞修工作计划
 */
 export function temPlantList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairWxPlan/page',
        method: 'post',
        data
    })
}
 export function temPlantApproveList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/wx/page',
        method: 'post',
        data
    })
}
 export function temPlantAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairWxPlan/add',
        method: 'post',
        data
    })
}
export function temPlantEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairWxPlan/edit',
        method: 'post',
        data
    })
}
export function temPlantDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairWxPlan/del/'+id,
        method: 'get',
    })
}
export function temPlantDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairWxPlan/'+id,
        method: 'get',
    })
}
/**
 * 临时计划查看 - 备品备件购置计划
 */
 export function temPurchasePlanList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairBpbjPlan/page',
        method: 'post',
        data
    })
}
 export function temPurchasePlanApproveList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/bpbj/page',
        method: 'post',
        data
    })
}
 export function temPurchasePlanAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairBpbjPlan/add',
        method: 'post',
        data
    })
}
export function temPurchasePlanEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairBpbjPlan/edit',
        method: 'post',
        data
    })
}
export function temPurchasePlanDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairBpbjPlan/del/'+id,
        method: 'get',
    })
}
export function temPurchasePlanDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairBpbjPlan/'+id,
        method: 'get',
    })
}
/**
 * 临时计划查看 - 液压油购置计划
 */
 export function temOilList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairOilPlan/page',
        method: 'post',
        data
    })
}
 export function temOilApproveList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/oil/page',
        method: 'post',
        data
    })
}
 export function temOilAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairOilPlan/add',
        method: 'post',
        data
    })
}
export function temOilEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairOilPlan/edit',
        method: 'post',
        data
    })
}
export function temOilDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairOilPlan/del/'+id,
        method: 'get',
    })
}
export function temOilDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairOilPlan/'+id,
        method: 'get',
    })
}
/**
 * 临时计划查看 - 检化验计划
 */
 export function temInspectionAndList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairJhyPlan/page',
        method: 'post',
        data
    })
}
 export function temInspectionAndApproveList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/jhy/page',
        method: 'post',
        data
    })
}
 export function temInspectionAndAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairJhyPlan/add',
        method: 'post',
        data
    })
}
export function temInspectionAndEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairJhyPlan/edit',
        method: 'post',
        data
    })
}
export function temInspectionAndDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairJhyPlan/del/'+id,
        method: 'get',
    })
}
export function temInspectionAndDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairJhyPlan/'+id,
        method: 'get',
    })
}
/**
 * 临时计划查看 - 其他工作计划
 */
 export function temOtherWorkList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/repairQtPlan/page',
        method: 'post',
        data
    })
}
 export function temOtherWorkApproveList(data) { //维修管理-临时计划-列表
    return request({
        url: '/maintenance-management/api/process/audit/qt/page',
        method: 'post',
        data
    })
}
 export function temOtherWorkAdd(data) { //维修管理-临时计划-新增
    return request({
        url: '/maintenance-management/api/repairQtPlan/add',
        method: 'post',
        data
    })
}
export function temOtherWorkEdit(data) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairQtPlan/edit',
        method: 'post',
        data
    })
}
export function temOtherWorkDelete(id) { //维修管理-临时计划-编辑
    return request({
        url: '/maintenance-management/api/repairQtPlan/del/'+id,
        method: 'get',
    })
}
export function temOtherWorkDetails(id) { //维修管理-临时计划-单条查询
    return request({
        url: '/maintenance-management/api/repairQtPlan/'+id,
        method: 'get',
    })
}


export function Exports(id) { //审批表导出--日常维修计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}

export function Exports2(id) { //审批表导出--坞修工作计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/two/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}

export function Exports3(id) { //审批表导出--备品备件计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/three/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}

export function Exports4(id) { //审批表导出--滑油计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/four/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}

export function Exports5(id) { //审批表导出--检化验计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/flve/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}

export function Exports6(id) { //审批表导出--其他计划
    return request({
        url: '/maintenance-management/api/repairInfoLs/export/word/six/'+id,
        responseType: 'arraybuffer',
        method: 'get',
    })
}
